package com.freemypay.service.impl;

import java.util.ArrayList;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.freemypay.dao.EmpMapper;
import com.freemypay.dao.UserMapper;
import com.freemypay.entity.Emp;
import com.freemypay.entity.User;
import com.freemypay.service.EmpService;
import com.freemypay.service.ItemService;
import com.freemypay.service.UserService;

/**
 * @author yesixian
 *
 */
@Service
@Transactional
public class UserServiceImpl implements UserService {
	
	@Autowired
	private UserMapper userMapper;
	
	@Autowired
	private ItemService itemService;

	@Override
	public User selectByPrimaryKey(Long id) {
		return userMapper.selectByPrimaryKey(id);
	}
	
	/**
	 * 事物测试
	 */
	@Override
	public void transactionTest(Long id) {
		itemService.deleteByPrimaryKey(605616L);
		userMapper.deleteByPrimaryKey(id);
	}

}
